{extend name="../../base/view/layout" /}
{block name="my_body"}
<div class="widgetbox box-inverse">
    <div class="widgetcontent wc1">

        <form id="form1" class="stdform" enctype="multipart/form-data" method="post" action="<?php echo url('news/Articlecat/edit');?>">

            <div class="tabbable">
                <ul class="nav nav-tabs buttons-icons">
                    <li class="active"><a data-toggle="tab" href="#shop_info"><?php echo $_page_title;?></a></li>
                </ul>
                <div class="tab-content">
                    <div id="shop_info" class="tab-pane active">

                        <div class="par control-group">
                            <label class="control-label" for="parent_id">上级分类</label>
                            <span class="field">
                            <select name="parent_id" class="uniformselect" id="parent_id">
                            	<option value="0">--顶级分类--</option>
                                <?php foreach($catData as $v):?>
                                <option value="<?php echo $v['id'];?>" <?php if($v['id']==$data['parent_id']) echo 'selected';?> ><?php echo str_repeat('-',$v['level']),$v['name'];?></option>
                                <?php endforeach;?>
                            </select>
                            </span>
                        </div>

                        <input type="hidden" name="id"  class="input-xlarge" value="<?php echo $data['id'];?>" />

                        <div class="par control-group">
                            <label class="control-label" for="name">分类名称</label>
                            <div class="controls"><input type="text" name="name" id="name" class="input-xlarge" value="<?php echo $data['name'];?>" /></div>
                        </div>


                        <div class="control-group par">
                            <label class="control-label" >菜单显示</label>
                            <span class="formwrapper">
                            	<div class="radio"><span><input type="radio" name="is_show" style="opacity: 0;" value="1" <?php if($data['is_show'] == 1) echo "checked";?> ></span></div> 是 &nbsp; &nbsp;
                            	<div class="radio"><span><input type="radio" name="is_show" style="opacity: 0;" value="0" <?php if($data['is_show'] == 0) echo "checked";?> ></span></div> 否 &nbsp; &nbsp;
                            </span>
                        </div>


                    <div class="par control-group">
                        <label class="control-label" for="sort_num">排序</label>
                        <div class="controls"><input type="text" name="sort_num" id="sort_num" class="input-xlarge" value="<?php echo $data['sort_num'];?>" /></div>
                    </div>

                        <div class="control-group par">
                            <label class="control-label" for="ico">分类图标</label>
                            <div class="controls"><input type="file" name="ico" id="ico" class="input-xlarge"  /></div>
                        </div>

                    <div class="control-group par">
                        <label class="control-label" for="ico"></label>
                        <div class="controls"><?php showImage($data['ico']);?></div>
                    </div>

                    </div>
                </div>
            </div>


            <p class="stdformbutton">
                <input type="submit" class="btn btn-primary" />
            </p>
        </form>
    </div><!--widgetcontent-->
</div><!--widget-->
{/block}

{block name="my_js"}


{/block}